package com.qfmy.app.service.impl.common;

import com.qfmy.app.mapper.common.AdvertisementMapper;
import com.qfmy.app.service.common.AdvertisementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.qfmy.app.service.impl.common
 * @date 2025/4/14
 * @description 广告控制服务类
 */
@Service
@SuppressWarnings("all")
public class AdvertisementServiceImpl  implements AdvertisementService {

    /**
     * 注入mapper
     */
    @Autowired
    private AdvertisementMapper advertisementMapper;

    /**
     * 根据类型和位置获取广告
     * @param type
     * @param position
     * @return
     */
    @Override
    public List<String> getAdvertisement(Integer type, Integer position) {
        if (type != null && position != null) {
            return advertisementMapper.getAdvertisement(type, position);
        }
        return null;
    }
}
